]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
messageTray: Clean up variable names
authorJasper St. Pierre <jstpierre@mecheye.net>
Wed, 2 Jan 2013 12:56:07 +0000 (07:56 -0500)
committerJasper St. Pierre <jstpierre@mecheye.net>
Mon, 20 May 2013 17:38:23 +0000 (13:38 -0400)
Variable names like "sourceNotificationStackDoneShowing" are too
long, and too undescriptive: this one points to a source, not a
notification stack that has been done showing.

js/ui/messageTray.js

index 64fcecf33ff87d5bbe96274a6c03275957b3c17c..635ee267750e557c8d705e9987359cf48c85c28e 100644 (file)
@@ -2768,17 +2768,14 @@ const MessageTray = new Lang.Class({
         this._summaryBoxPointerState = State.HIDDEN;
         this._summaryBoxPointer.bin.child = null;
 
-        let sourceNotificationStackDoneShowing = null;
         if (doneShowingNotificationStack) {
-            this._summaryBoxPointerItem.doneShowingNotificationStack();
-            sourceNotificationStackDoneShowing = this._summaryBoxPointerItem.source;
-        }
+            let source = this._summaryBoxPointerItem.source;
 
-        this._summaryBoxPointerItem = null;
+            this._summaryBoxPointerItem.doneShowingNotificationStack();
+            this._summaryBoxPointerItem = null;
 
-        if (sourceNotificationStackDoneShowing) {
-            if (sourceNotificationStackDoneShowing.isTransient && !this._reNotifyAfterHideNotification)
-                sourceNotificationStackDoneShowing.destroy(NotificationDestroyedReason.EXPIRED);
+            if (source.isTransient && !this._reNotifyAfterHideNotification)
+                source.destroy(NotificationDestroyedReason.EXPIRED);
             if (this._reNotifyAfterHideNotification) {
                 this._onNotify(this._reNotifyAfterHideNotification.source, this._reNotifyAfterHideNotification);
                 this._reNotifyAfterHideNotification = null;